Published on

Control and monitor remote devices using embedded web server

Authors
  • avatar
    Name
    Kr. Gaurav
    Twitter

I. INTRODUCTION

In comparison with PC, the embedded system is greatly improved in stability, reliability and safety etc. It"s easy to implement, and it is an effective way of leading Internet into embedded system. In this article embedded systems and Internet technology are combined to form a new technology - the Embedded Internet Technology, which developed with the popularization of computer network technology in recent years. This technology could function in the hardware and software as long as they are connected. Only by using web browser through the Ethernet and TCP/IP protocol users can get access information of remote devices. It brings great convenience to remote equipment control and management. The main advantages of using embedded Web server system mainly include: (1) the client can be freely set and the browser can be used directly without installing additional client software; (2) the operating system Win CE, which can be reduced and transplanted, provides a convenient, fast and simple method for embedded systems and Internet access.(3) Small size, low power consumption, low cost and flexible designed.

An Embedded web server which controls and monitors the remote devices has the advantages over the traditional monitoring system which are based on the PC and chip microprocessor. The chip microprocessor transplanted TCP/IP protocol is configured to an embedded web server which has data collection, storage and communication functions. The method can reduce development cost, but at the same time, it brings some difficulties in functional upgrading and expansion. PC is the central Part of remote monitoring system. The design can shorten the development cycle with the help of mature development tools on the PC platform. But it has some drawbacks as high cost, unsatisfactory stability and reliability. Moreover in the Client/Server architecture, the maintenance burden on the server would be heavy because some particular monitor software should be installed on each remote monitor terminal. In various Internet applications based on client server architecture, it is better to use embedded WEB server other than PC server for decreasing volume, cost and power consumption. Remote monitoring system based on embedded web server Through Embedded Web Server System we can connect any electronic device to web server and can get the real time data of devices through the web pages released by the server. The method can overcome the problem of PC based monitoring system. HTTP engine is the core of any embedded Web Server. It is used to transfer the web pages from server to the client.HTTP1.0 are easy to implement but it has some drawbacks. First problem with HTTP 1.0 lacks explicit cache control mechanism. The second major problem with HTTP 1.0 is that each HTTP request requires its own TCP connection. Third is Overload problem at the Web server. HTTP 1.1 has overcome the drawbacks of HTTP 1.0 by adding explicit cache control mechanisms. HTTP 1.1 allows for a single persistent TCP connection between the browser and the server for multiple HTTP transactions. It improves the performance of Web Server. Java Applet has some advantageous over CG Java Applet has some advantageous over CGI.(1)Java Applet[6][7] is a dependent java program which is embedded into HTML and interpreted by virtual machine in browser. Its development doesn"t matter with software and hardware environment of server.(2) The compile results of Java Applet program "Byte code Files" reside on the host machine, only need to download to the target machine. That avoids cross compilation of CGI program.(3)Embedded web server merely exchanges data with Java Applet, but the display task of monitoring web is finished independently by Java Applet on browser. This working mode ensures the load balance between embedded web server and browser.

III. PROPOSED WORK

The article presents the design of an embedded web server system by which it is possible to control and monitor of remote device. The device would be any electrical device. The design is based on ARM920T S3C2440 processor. Server is implemented on this processor. Advanced RISC Machine (ARM) 32 bits processor has power full rich instruction sets,16KB instruction cache, 16KB data cache, Full Memory Management Unit, Write Buffer. The friendly ARM also known as mini S3C2440 processor is a complete minicomputer. It supports Linux and Win CE operating system. The proposed design is based on the Win CE.net 5.0operating system. Win CE.net provide the following features:- DM9000 driver source code, Drivers for USB keyboard, mouse, flash drive and portable hard disks Drivers for 3 serial ports USB ActiveSync Audio driver, SD card driver, RTC clock, Registry archive, Power-down data save in flash drive, Screen rotation etc. Win CE supports ASP.Net application. Server is implemented in ASP, that overcomes the problems with the java applet. After the successful realization of server on mini2440 board this server system can be used to monitor and control of remote device. Sensor expansion board is used to send wireless signal from sever to the device. For wireless communication RF module is attached with each device which continuously send data about the device to the server via sensor expansion board. Sensor expansion board based on AVR AtTmega324,because it has two UART ,one UART port is connected to the ARM processor and second port is connected to the RF module. Frequency of RF module is 433 MG Hz. LM35 sensor is used in each RF module. It sense temperature of environment. The temperature is used for threshold value. Based on this threshold value the device will be switched on or off. Each RF module controlled by AVR ATmega 8 microcontroller.

IV. SYSTEM COMPONENT

A. Experimental Platform for embedded web server

The design in this article applies MINI2440 32-bit ARM microprocessor which takes ARM920T as its core. The MINI2440 Development Board is based on the Samsung S3C2440 microprocessor. Its PCB is 4-layer boarded, equipped with professional equal length wiring which ensures signal integrity. The MINI2440 development board equipped with a wide variety of connectors, interfaces and ports. This microprocessor has rich resources, including Clock, USB, SDRAM, UART, Nand Flash, Nor Flash LCD, RS232 Interface, Ethernet Interface, JT AG, Power, etc. The frequency Samsung S3C2440AL is 400MHz and can up to 533MHz in the maximum. According to its mode of internal circuit. 12MHz chosen for the crystal. JTAG (Joint Test Action Group) is an international test protocol standard, software simulation, single-step debug and u-boot download can be carried out through the JTAG port, it's a simple andefficient means of developing and debugging embedded systems. The SDRAM capacity in the system is 64MB, working voltage is 3.3V, data bus is 32bit,clock frequency up to 533 MHz Auto-Refresh and Self-Refresh are both supported. For supporting boot loader in the NAND Flash,, a buffer named Steppingstone is equipped in SDRAM. When the system starting, the first 4Kbyte content in NAND Flash is load to the Steppingstone and be executed. When Start-up code, the contents of the NAND Flash are copied to the SDRAM in general. The data is in NAND Flash are checked when ECC is used. The main program will be executed on the SDRAM based on the completion of copy [5]. S3C2440AL UART provide three serial I/O port, each port can operation on interrupt or DMA mode. UART can support a maximum baud rate of 115.2Kbps when using the system clock. Each UART channel for the receiver and transmitter includes two 64-bit FIFO. The LCD interface of S3C2440Al is integrated 4-wire resistive touch screen interface which can be directly connected to four wire resistive touch screen. Web server is implemented on this platform.

B. Hardware for wireless communication module

In the proposed work the web server is used to control and monitor of remote device. To achieve remote communication to the devices a sensor expansion board is connected with the mini2440 board via COM1 port, at baud rate of 2400 using RS232 serial communication standard. In sensor expansion board AVR ATmega324 microcontroller is used to achieve wireless communication via RF module. The AVR is a Modified Harvard architecture 8-bit RISC single chip microcontroller (µC) which was developed by Atmel in 1996.AVR ATmega 324 is an 8bit (µC), with two UART port. In the proposed design both ports are used, one port is connected to the mini2440 board to communication with web server, another port is connected to the RF module. Frequency of RF module is 433MHz.Sensor expansion acts as controller for remote device. At each device relay is used to switch on or off the device. Each Device is controlled via ATmega 8 micro controller. At PORT D of AVR ATmega 8 (µC) the RF module is attached, and at PORT B the device is connected via relay.

V. SYSTEM ARCHITECTURE

System architecture of An Embedded Web Server System which controls and monitors the remote devices is presented. The system uses 32-bit RISC processor Samsung S3C2440 with various features and peripherals. It"s based on ARM 920T core and supports embedded Linux, WinCE, VxWorks and other embedded operating system. In thi System architecture of An Embedded Web Server System which controls and monitors the remote devices is presented. The system uses 32-bit RISC processor Samsung S3C2440 with various features and peripherals. It"s based on ARM 920T core and supports embedded Linux, WinCE, VxWorks and other embedded operating system. In this article Win CE Operating system is transplanted on S3C2440 processor. The hardware of the system is designed in four parts:-

The first part that is the core of the architecture based on ARM 920T processor. The Win CE.net5.0 operating system is transplanted on the ARM based mini2440 board. The user interface is developed in ASP(Active server page)technology. After that Web server is transplanted to the S3C2440 ARM processor.

The second part of the system architecture is the sensor expansion board which based on AVR ATmega324 microcontroller. It has a special feature of power on reset. It is connected with Embedded web server system via RS232 serial interface and send the information regarding the remote devices to the web server.

The third part of the system architecture is the wireless communication module. In this module remote devices are connected to the sensor expansion board via RF module. RF transceiver is different from general wireless transceiver for broadcasting in the respects of small size, low power consumption, support for battery-powered devices. RF transceiver is mainly responsible for modulation, demodulation, sending and receiving of signal. It is mainly used in RF signal processing, control, coordinating all parts of the device and communicating with external devices through the serial port. In the fourth part the embedded web server system will be connected to the LAN/ or internet via Ethernet interface. On the client PC remote user can access the information of the remote devices through the web pages which will be transmitted by the web server. System is based on Browser/server architecture.

VI. DESIGN OF THE SYSTEM SOFTWARE

The monitoring program for the sensor expansion board and the monitoring program at mini2440 board make up the components of the system"s software. The control center, ARM920T processor, uses Win CE as the operating system. Thus, its kernel can be reduced and it takes small part of the system memory. The development languages for the system program are ASP,VB(visual basic) and during the development process, development environment, Microsoft visual studio-2008 used. The monitoring program includes information collection, processing, sending and receiving program, information display program It has the following three main functions: Communicating with sensors expansion board, including real-time data of environment and reading, controlling parameters etc. Storing ,processing and displaying data. Communicating with remote device through sensor expansion board In the information collection program, firstly, it opens the serial device, goes through the initialization of simple serial port and sets baud rate and other information, which will enable serial communication between the server based on S3C2440 and the sensor expansion board. Then by reading the serial data, data collected by the sensors is going to be stored into S3C2440 and the server is going to process this information and send it to a remote devices by the information processing and delivery programs. The information display program is responsible for displaying control parameters, which is developed by using cross platform GUI. Information display program is separated from others; it continues to read temperature from the remote device and keeps updating the temperature. If the received temperature is greater than or equal to the minimum threshold value and less than or equal to the maximum threshold value than the device will be switched on, otherwise the device will be switched off. Each device is attached with RF module that continuously send information to the sensor expansion board. The sensor expansion board acts as mediator between the remote device and server. It receives all the request from the server and based on this request forward it to the RF module which is attached with the remote device. Based on the received request relay is tripped ,and the device will be turned on or off. The wireless sensor node is controlled by AVR ATmega8 microcontroller. It is a 28 pin IC. At port D RF module (RF Transreceiver) is connected and at port B relay is connected. Across relay electrical device is connected.

VII. KEY TECHNOLOGY USE FOR IMPLEMENTATION

There are many different technologies to achieve dynamic Web page, commonly used with CGI, ASP, PHP, and JSP and so on. In Win CE, ASP often used to achieve dynamic page ASP.Net is language independent..Net is the ease with which it allows the exchange of data between various software applications. The ASP improves the speed of communication between devices and web server. ASP provides an access to execute external program for Web server, this server technology can be made to interact between the browser and server. ASP programs can be written by any programming language, for example VB, VC, C and so on. VB is used in this article. The server program is implemented in VB. For threshold value temperature is used. Two threshold value minimum as temp1 and maximum as temp2 is declared first. Default value of minimum temperature is "0"degree Celsius and maximum value is "50" degree Celsius. Within this limit device will remain switched on. As the user click on the start monitoring button , the serial port in turned on and also write start character "00" to enable serial communication with sensor expansion board. After getting the start character from the server, sensor expansion board receives the temperature form the wireless sensor node of device, and than server gets the environmental temperature and add this to the default temperature value. After the addition it compares the this value with threshold value min and max if the temperature remains within this limit than server writes "0" character on serial port with serMain.Write("0",c).If the temperature is not within the limit then server write"1" character on serial port with serMain.Write("1",c). On sensor expansion board the monitoring program is implemented. It is based on AVR ATmega 324 microcontroller. It is programmed in WinAVR editor with embedded C. It has two UART port, declared as UART0 and UART1.On UART0 port it receives data at baud rate of 2400 from server. A six byte character array data[6] is declared for receiving character from server. If the communication is enable than it receives first three character in data[0],data[1] and data[2] from UART0 port. If data[2]="#" that means the received byte is correct. After that server program writes on UART0 port first three character ("$", "1", "data[1]", "#"). If the received ch="1" than loop starts for 100 times and clear bit on transmitter enable port ,and than receives four characters ("$"," "1", "1", "#") on UART1. Here "$" and "#" are the start and stop character. Second character "1" represent the wireless sensor node1 and third character "1" represents signal for switch on the relay on wireless sensor node1. If ch="0" then it receives four characters ("$"," "1", "0", "#"), here the third character "0" represents signal for switch off the relay on wireless sensor node1.

VIII. TESTS AND RESULTS

The embedded web server based on ARM 920T S3C2440 processor connected to the sensor expansion board to the UART port via RS232 standard interface. Sensor expansion board AVR ATmega 324 microcontroller is used. It is 40 pin IC, At port D of AVR microcontroller, an RF transmitter –receiver module is connected. This RF module send and receive data wirelessly from the wireless sensor node of device, and send it to the server. Based on the received data the remote devices can be controlled and monitored.

The server page on which user can set the limits of threshold parameter i.e. the minimum and maximum values. By default values of minimum and maximum are "0" degree Celsius and "50" degree Celsius respectively. On mini2440 board three COM ports are available., In this design COM1 port is used with 2400 baud rate. After clicking on the start monitoring button the user can server starts communication. As the server acquires the environmental temperature from the wireless sensor node it publishes that temperature in the nodes data block on the server page. Based on this environmental temperature the user can control and monitor the remote devices. Overall control of the remote device is in user"s hand. If the user has a network connected computer than at any time from anywhere user can check the status of device, as well as switch on or off the devices. Fig. 7 Server page on ARM 920T S3C2440 processor

VIII. CONCLUSION

In this article an Embedded Web Server system design is present through which remote devices can be controlled and monitored The article presents system by which it is possible to controlling and monitoring any electrical device remotely, via clicking on the server page devices can be switched on or off. The design will overcome the drawbacks of Java Applet. In place of Java Applet Visual Basic is used for development of user interface. User can control, monitor, and diagnose the problem with the remote devices. The design is based on ARM-Win CE operating system. The developed system is applicable in Industries, Research , and Educational Institution etc. The whole system has low-cost, good openness and portability, and is easy to maintain and upgrade.